Combining de Bruijn Indices and Higher-Order Abstract Syntax in Coq
نویسندگان
چکیده
The use of higher-order abstract syntax is an important approach for the representation of binding constructs in encodings of languages and logics in a logical framework. Formal meta-reasoning about such object languages is a particular challenge. We present a mechanism for such reasoning, formalized in Coq, inspired by the Hybrid tool in Isabelle. At the base level, we define a de Bruijn representation of terms with basic operations and a reasoning framework. At a higher level, we can represent languages and reason about them using higher-order syntax. We take advantage of Coq’s constructive logic by formulating many definitions as Coq programs. We illustrate the method on two examples: the untyped lambda calculus and quantified propositional logic. For each language, we can define recursion and induction principles that work directly on the higher-order syntax.
منابع مشابه
Meta - Theory of Sequent - Style Calculi in CoqA
We describe a formalisation of proof theory about sequent-style calculi, based on informal work in DP96]. The formalisation uses de Bruijn nameless dummy variables (also called de Bruijn indices) dB72], and is performed within the proof assistant Coq BB + 96]. We also present a description of some of the other possible approaches to formal meta-theory, particularly an abstract named syntax and ...
متن کاملHigher-order Abstract Syntax in Type Theory
We develop a general tool to formalize and reason about languages expressed using higher-order abstract syntax in a proof-tool based on type theory (Coq). A language is specified by its signature, which consists of sets of sort and operation names and typing rules. These rules prescribe the sorts and bindings of each operation. An algebra of terms is associated to a signature, using de Bruijn n...
متن کاملEquivalence of System F and λ2 in Abella
We give a machine-checked proof of the equivalence of the usual, two-sorted presentation of System F and its single-sorted pure type system variant λ2. This is established by reducing the typability problem of F to λ2 and vice versa. The systems are formulated using higher-order abstract syntax and the proof is executed in the Abella proof system. We compare and contrast this proof to our earli...
متن کاملMechanized Reasoning for Binding Constructs in Typed Assembly Language Using Coq
Mechanized reasoning about programming languages and type systems is becoming increasingly important for the development of certified code frameworks. For instance, in order to realize the safety and security potential of proof-carrying code (PCC) [3] the development of formal, machine-checkable proofs is a necessity. Much of the difficulty and research surrounding PCC involves the generation o...
متن کاملSyntax for Free: Representing Syntax with Binding Using Parametricity
We show that, in a parametric model of polymorphism, the type ∀α.((α → α) → α) → (α → α → α) → α is isomorphic to closed de Bruijn terms. That is, the type of closed higher-order abstract syntax terms is isomorphic to a concrete representation. To demonstrate the proof we have constructed a model of parametric polymorphism inside the Coq proof assistant. The proof of the theorem requires parame...
متن کامل